<include file="Public:header" />
<load href="../Public/Js/swf2ckeditor.js" />
<script language="javascript">
function formcheck()
{	
 
	if($.trim($("#names").val())=='')
	{
		$("#msg_names").html("请填写名称");
		$("#names").focus();
		return false;
	}
	if($.trim($("#memo").val())=='')
	{
		$("#msg_memo").html("请填写描述");
		$("#memo").focus();
		return false;
	}
}
</script>

<form action="__URL__/section_edit" enctype="multipart/form-data" method="post" onsubmit="return formcheck();">
<table border="0" cellspacing="0" cellpadding="0" class="t1">
  <tr>
  	<th colspan="2">添加栏目</th>
  </tr>
  <tr>
  <td><a class="bule" href="section_list">栏目列表</a></td>
  <td class="buttom"><label>
    <input type="submit" name="submit" id="submit" value="保存" />
    <input type="reset" name="reset" id="reset" value="重置" />
  </label></td>
  </tr>
  </table>
  <input type=hidden value=2 name="cid">
<table border="0" cellspacing="0" cellpadding="0" class="t3">
<tr style="display:none">
<input type="hidden" id="id" name="id" value="{$section_edit['id']}" />
    <td align="right"><span class="msg">*</span>请选择模型</td>
    <td><label>
      <select id="modelid" onchange="change_tpl(this.value)" name="model">
        <option selected="" value="">请选择模型</option>
        <option value="1">文章模型</option>
        <option value="2">下载模型</option>
        <option value="3">图片模型</option>
      </select>
    </label><span id="msg_add" class="msg"></span></td>
  </tr>
  <tr>
    <td align="right"></span>上级栏目</td>
    <td><label>
    <select id="parentid" name="pid">
      <option value="0">≡ 作为一级栏目 ≡</option>
      <volist name="add_pid_zero" id="v">
	  <if condition="$v.id == $section_edit['pid'] ">
        <option selected="selected" value="{$v.id}">&nbsp;├ {$v.names}</option>
		<else/>
		<option value="{$v.id}">&nbsp;├ {$v.names}</option>
		</if>
        <volist name="add_pid" id="vo">
          <if condition="$v.id == $vo.pid ">
		  <if condition="$vo.id == $section_edit['pid'] ">
            <option selected="selected" value="{$vo.id}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;├ {$vo.names}</option>
			<else/>
			<option value="{$vo.id}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;├ {$vo.names}</option>
			</if>
          </if>
        </volist>
      </volist>
      
    </select>
    </label></td>
  </tr>
  <tr>
    <td align="right"><span class="msg">*</span>栏目名称</td>
    <td><label>
      <input type="text" name="names" id="names" value="{$section_edit['names']}" />
    </label><span id="msg_names" class="msg"></span></td>
  </tr>
  <tr>
    <td align="right"><span class="msg">*</span>描述</td>
    <td><label>
      <textarea name="memo" cols="50" rows="5" id="memo" >{$section_edit['memo']}</textarea>
    </label><span id="msg_memo" class="msg"></span></td>
  </tr>
  <tr style="display:none">
    <td align="right"><span class="msg">*</span>位置顺序</td>
    <td><label>
      <input type="text" name="sort" id="sort" />
    </label><span id="msg_sort" class="msg"></span></td>
  </tr>
  <tr style="display:none">
    <td align="right"><span class="msg">*</span>是否在导航显示</td>
    <td><label>
    <input type="radio" checked="" value="1" name="navigation[ismenu]">
是&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" value="0" name="navigation[ismenu]">
否
    </label><span id="msg_config_key" class="msg"></span></td>
  </tr>
  </table>
</form>
<include file="Public:footer" />